package com.sdjzu.university.controller;

import com.sdjzu.university.entity.University;
import com.sdjzu.university.service.UniversityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UniversityController {
    @Autowired
    UniversityService universityService;

    @RequestMapping("/select")
    public List<University> selectList() {
        return universityService.selectList();
    }

    @RequestMapping("/insert")
    public int insert(){
        return universityService.insert();
    }

    @RequestMapping("/update")
    public int update(){
        return universityService.update();
    }

    @RequestMapping("/delete")
    public int delete() {return universityService.delete();}





}
